<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <up6
    :config=up6_config
    :fields="{uid:0}"
    @ready="up6_ready"
    @md5_complete="up6_md5_complete"
    @scan_complete="up6_scan_complete"
    @file_append="up6_file_append"
    @file_complete="up6_file_complete"
    @folder_complete="up6_folder_complete"
    @queue_complete="up6_queue_complete"/>
  </div>
</template>

<script>
import up6 from '@/components/up6'
let api = 'http://localhost:8888/api/up6/'
export default {
  name: 'HelloWorld',
  components: {up6},
  data () {
    return {
      msg: '泽优大文件上传控件(up6) vue cli 示例',
      up6_config: {
        UrlCreate: api + 'f_create.aspx',
        UrlPost: api + 'f_post.aspx',
        UrlProcess: api + 'f_process.aspx',
        UrlComplete: api + 'f_complete.aspx',
        UrlDel: api + 'f_del.aspx',
        UrlFdCreate: api + 'fd_create.aspx',
        UrlFdComplete: api + 'fd_complete.aspx',
        UrlFdDel: api + 'fd_del.aspx',
        UrlList: api + 'f_list.aspx',
        License2: '', // 授权码
        FileFilter: '*'
      }
    }
  },
  methods: {
    up6_md5_complete (obj, md5) {
      // 文件MD5验证完毕事件
    },
    up6_scan_complete (obj) {
      // 文件夹扫描完毕事件
    },
    up6_file_append (obj) {
      // 文件或目录添加完毕
    },
    up6_file_complete (obj) {
      // 文件上传完毕事件
    },
    up6_folder_complete (obj) {
      // 文件夹上传完毕事件
    },
    up6_queue_complete (obj) {
      // 队列上传完毕事件
    },
    up6_ready () {
      // 控件加载完毕
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
